package com.topnav.mc.admin.service.impl;

import com.topnav.mc.admin.dao.mapper.DeviceFavoriteMapper;
import com.topnav.mc.admin.entity.DeviceFavorite;
import com.topnav.mc.admin.entity.bean.DeviceFavoriteBean;
import com.topnav.mc.admin.entity.param.DeviceFavoriteParam;
import com.topnav.mc.admin.service.IDeviceFavoriteService;
import com.topnav.mc.base.mc.McServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Author: kenny
 * @Date: 2024/1/9 16:56
 */
@Service
public class DeviceFavoriteServiceImpl extends McServiceImpl<DeviceFavoriteMapper, DeviceFavorite, DeviceFavoriteBean, DeviceFavoriteParam>
            implements IDeviceFavoriteService {

    @Override
    public boolean beforeSave(DeviceFavorite entity){
        entity.setCreateTime(new Date());
        entity.setUpdateTime(new Date());
        return true;
    }

    @Override
    public boolean beforeUpdate(DeviceFavorite entity){
        entity.setUpdateTime(new Date());
        return true;
    }

/*    protected boolean beforeDelete(T entity){return true;}
    protected void afterDelete(T entity){};*/
}
